<include file="App/Home/View/Public/header.html"/>
<style>
.backg_pic {
    min-height: 600px;
    width:100%;
    padding-top: 70px;
}
.ybc_section {
    width: 998px;
    margin: 20px auto;
    background-color: #fff;
    opacity: 0.8;
}
.ybc_userarea {
    margin: 70px auto;
}
.qh_kong{height:90px;}
.help_div_p{min-height:500px; width:42%;background-color:#fff;padding:1% 4% 4% 4%;margin:0 auto;}
.help_div_div{min-height:500px;/*position: relative;*/}
.bg_backle{background-color:rgba(0,0,0,0.8);width:100%;height:100%;position:fixed;top:0px;left:0px;min-height:900px;z-index:999}
/*.one_div{position: absolute;
    bottom: 10px;     width: 36%;
margin-left:32%}
.one_div1{float:left;padding:10px 10%; background-color:#f70;color:#fff;cursor:pointer}
.one_div2{float:left;padding:10px 14%; background-color:#ff6000;color:#fff; margin-left:10%;cursor:pointer}*/
.ybc_section {
    width: 998px;
    margin: 20px auto;
    background-color: #fff;
    opacity: 0.8;
    border: 1px solid #ddd;
}
.ybc_user_nav {
    margin-top: 30px;
}
.ybc_user_nav {
    margin-top: 30px;
}
.Font18 {
    font-size: 18px;
}
.clearfix {
    zoom: 1;
}
.ybc_user_nav .current {
    color: #008efe;
    border-bottom: 2px solid  #008efe;
}
.ybc_user_nav li {
    width: 25%;
    float: left;
    text-align: center;
    border-bottom: 2px solid #ddd;
    padding-bottom: 15px;
}
.one_div {
    /*position: absolute;*/
    /*bottom: 10px;*/
    width:100%
    margin-left: 0;
    margin: 0 auto;
}
.one_div1 {
   /* position: relative;*/
    float: left;
    margin-left: 28%;
    padding: 10px 5%;
    background-color:rgba(0, 143, 255, 0.73);
    color: #fff;
    cursor: pointer;
}
@media (max-width: 800) {
    #one_div1{
        margin-left: 20%;
    }
    
}
.one_div2 {
    /*position: relative;*/
    float: left;
    padding: 10px 6%;
    background-color: #008efe;
    color: #fff;
    margin-left: 10%;
    cursor: pointer;
}
li {
    list-style: none;
}
.ybc_user_nav .current span {
    background: #008efe;
}
.ybc_user_nav li span {
    color: #fff;
    background: #ccc;
    border-radius: 20px;
    padding: 3px 8px;
    margin: 10px;
}
.ybc_userarea {
    margin: 70px auto;
}
.ybc_user {
    margin-bottom: 20px;
}
.left {
    float: left;
}
.ybc_label {
    width: 380px;
    height: 30px;
    line-height: 30px;
    text-align: right;
    padding-right: 5px;
}
* {
    margin: 0;
    padding: 0;
    list-style: none;
}
label {
    cursor: default;
}
input, button, textarea, select {
    vertical-align: middle;
}

.ybc_hint {
    height: 30px;
    line-height: 30px;
    color: #999;
}
.ybc_hint .msg_i {
    background: #0bf;
    font-size: 14px;
    font-family: monospace;
}
.ybc_hint strong {
    display: block;
    float: left;
    margin-top: 7px;
    width: 16px;
    text-align: center;
    height: 16px;
    line-height: 16px;
    color: #fff;
    border-radius: 8px;
    margin-right: 5px;
}
.ybc_warn {
    text-align: center;
    color: #f00;
    margin-top: 50px;
    height: 30px;
    line-height: 30px;
    background: url(/images/ybc_dui_bg.png) 335px center no-repeat;
    padding-left: 25px;
}
.ybc_warn span {
    padding: 1px 4px;
    color: #fff;
    background: #f00;
    border-radius: 20px;
    font-family: 'Microsoft Yahei';
    margin-right: 5px;
}
.Font16 {
    font-size: 16px;
}
#tongyi {
    width: inherit;
    height: inherit;
    vertical-align: middle;
    margin-top: 8px;
    border: 0;
    
}
.ybc_text input {
    width: 200px;
    height: 30px;
    line-height: 20px;
    padding: 4px 0 4px 2px;
    border: 1px solid #ddd;
    margin-right: 5px;
}
#agreement {
    font-size: 12px;
    line-height: 22px;
     color: #2471cb;
    text-decoration: underline;
}
.ybc_text .ybc_next {
    width: 204px;
    text-align: center;
    height: 40px;
    line-height: 40px;
    background: #008efe;
    color: #fff;
    font-size: 16px;
    font-family: 'Microsoft Yahei';
    border: 0;
    padding: 0;
    cursor: pointer;
}
.ybc_text input {
    margin-right: 5px;
}
</style>
<!--<div class="bg_backle"></div>
 <div style="width: 100%;position: relative;z-index: 999;">
    <div class="help_div_p">
    <div class="help_div_div">
        <h3 style="text-align:center;font-size:18px;line-height:100px;font-weight:bold">服务条款</h3>
        <p style="font-size:15px; line-height:25px;">&nbsp;&nbsp;服务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款
        服务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款服
        务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款服务条款</p>
        <div style="width: 100%;height:300px;"></div>
        <div class="one_div" style="width: 100%;height:100px;">
            <a href="{:U('Index/index')}"><div class="one_div1" id="one_div1">我不同意</div></a>
            <div class="one_div2">我同意</div>
            <div class="clearfix"></div>
        </div>
    </div>
</div>
</div>

<script>
$(".one_div2").click(function(){
    $(".bg_backle").hide();
    $(".help_div_p").hide();
})
</script> -->
<div class="backg_pic">
<div class="ybc_section">
    <ul class="ybc_user_nav clearfix Font18">
        <li class="current"><span>1</span>用户注册</li>
        <li id="currentpwd"><span>2</span>设置交易密码</li>
        <li><span>3</span>实名认证</li>
        <li><span>4</span>注册成功</li>
    </ul>
    <form class="ybc_userarea" id="ttttform" method="post" jump-url="{:U('ModifyMember/modify')}" action="{:U('Reg/addReg')}" onsubmit="return step2();">
        <div id="step1">
            <!--<div class="ybc_user clearfix">
                <div class="ybc_label left"><label for="pid">邀请码</label></div>
                <div class="ybc_text left"><input type='text' name='pid' value="0"></div>
            </div>-->
            <div class="ybc_user clearfix">
                <div class="ybc_label left"><label for="email">用户名</label></div>
                <div class="ybc_text left"><input name="email" id="email" type="text"></div>
                <div class="ybc_hint left"><strong class="msg_i" id="email_msg">i</strong><span id="emailmsg">请输入邮箱作为用户名</span></div><!--默认 i class="msg_i"  正确class="msg_error"  错误class="msg_ok"-->
            </div>
            <div class="ybc_user clearfix">
                <div class="ybc_label left"><label for="pwd">登录密码</label></div>
                <div class="ybc_text left"><input id="pwd" name="pwd" type="password"></div>
                <div class="ybc_hint left"><strong class="msg_i" id="pwd_msg">i</strong><span id="pwdmsg">密码长度6-20位</span></div>
            </div>
            <div class="ybc_user clearfix">
                <div class="ybc_label left"><label for="repwd">重复密码</label></div>
                <div class="ybc_text left"><input id="repwd" name="repwd" type="password"></div>
                <div class="ybc_hint left"><strong class="msg_i" id="repwd_msg">i</strong><span id="repwdmsg">重复输入密码，两次需要一致</span></div>
            </div>
			
            <div class="ybc_user clearfix" <eq name='status' value="0"> style="display:none" </eq> >
                <div class="ybc_label left"><label for="pid">邀请码</label></div>
                <div class="ybc_text left"><input name="pid" <if condition="$pid">value="{$pid}" onkeyup="this.value={$pid}" </if>  type="text"></div>
                <div class="left" style="color:#f00; line-height:30px;">选填项</div>
            </div>
            <div class="ybc_user clearfix">
                <div class="ybc_label left"><label>&nbsp;</label></div>
                <div class="ybc_text left"><input name="agree" id="tongyi" value="1" checked="checked" type="checkbox"></div>
                <div class="ybc_hint left"><label for="tongyi">同意{$config.name}</label> <a href="{:U('Reg/terms')}" id="agreement">服务条款</a></div>
                <div class="ybc_hint left"><span id="agree"></span></div>
            </div>
            <div class="ybc_user clearfix">
                <div class="ybc_label left"><label>&nbsp;</label></div>
                <div class="ybc_text left"><input value="下一步" class="ybc_next" onclick="step1()" type="button"></div>
            </div>
        </div>
        <div id="step2" style="display:none">
            <div class="ybc_warn Font16" style="background:none; margin:-40px 0 60px 0;"><span class="msg_warn">！</span>为保障您的资金安全，请设置交易密码。              <br>对账户资产进行投资、交易、转出时，需用到交易密码，请务必牢记。</div>
            <div class="ybc_user clearfix">
                <div class="ybc_label left"><label for="pwdtrade">交易密码</label></div>
                <div class="ybc_text left"><input id="pwdtrade" name="pwdtrade" type="password"></div>
                <div class="ybc_hint left"><strong class="msg_i" id="pwdtrade_msg">i</strong><span id="pwdtrademsg">请输入交易密码，不能与登录密码相同</span></div>
            </div>
            <div class="ybc_user clearfix">
                <div class="ybc_label left"><label for="repwdtrade">重复交易密码</label></div>
                <div class="ybc_text left"><input id="repwdtrade" name="repwdtrade" type="password"></div>
                <div class="ybc_hint left"><strong class="msg_i" id="repwdtrade_msg">i</strong><span id="repwdtrademsg">重复输入交易密码，两次需要一致</span></div>
            </div>
            <div class="ybc_user clearfix">
                <div class="ybc_label left"><label for="repwdtrade">图形验证码</label></div>
                <div class="ybc_text left"><input id="repwdtrade" name="code" type="text"></div>
                <div class="ybc_hint left">
                <img class="yanzm" id="captchaimg" src="{:U('Login/showVerify')}" onclick="$('#captchaimg').attr('src', '{:U(\'Login/showVerify\')}?t='+Math.random())" >
                
                </div>
            </div>
            <div class="ybc_user clearfix">
                <div class="ybc_label left"><label>&nbsp;</label></div>
                <div class="ybc_text left"><input value="下一步" class="ybc_next" type="submit"></div>
            </div>
        </div>
    </form>
</div>
</div>
<script src="__PUBLIC__/Home/js/form.js"></script>
<script type="text/javascript">
    vali = {email: 0, pwd: 0, repwd: 0,tongyi:1};
    valistep2 = {pwdtrade: 0, repwdtrade: 0}
    $('#email').bind('blur', function(){
        var path_Email = "{:U('Reg/ajaxCheckEmail')}";
        $.get(path_Email,{email:encodeURIComponent($(this).val())}, function(d){
            if(d['status'] == 1){
                $('#email_msg').html("√");
                $('#email_msg').css('msg_ok');
            }else{
                $('#email_msg').html("×");
                $('#email_msg').css('msg_error');
            }
            validateMsg('email', d['msg'], d['status']);
            vali.email = d['status'];
        }, 'json');
    });

    $('#pwd').bind('blur', function(){
        var pLen = $(this).val().length;
        if(pLen < 6 || pLen > 20) {
            $('#pwd_msg').html("×");
            $('#pwd_msg').css('msg_error');
            return validateMsg('pwd', '密码长度在6-20个字符之间', 0);
        }
        $('#pwd_msg').html("√");
        $('#pwd_msg').css('msg_ok');
        return validateMsg('pwd', '', vali.pwd = 1);
    });
    $('#repwd').bind('blur', function(){
        var pLen = $(this).val().length;
        if(pLen < 6 || pLen > 20){
            $('#repwd_msg').html("×");
            $('#repwd_msg').css('msg_error');
            return validateMsg('repwd', '密码长度在6-20个字符之间', 0);
        }
        if($('#pwd').val() != $('#repwd').val()){
            $('#repwd_msg').html("×");
            $('#repwd_msg').css('msg_error');
            return validateMsg('repwd', '密码不一致，请重新输入。', 0);
        }
        $('#repwd_msg').html("√");
        $('#repwd_msg').css('msg_ok');
        return validateMsg('repwd', '', vali.repwd = 1);
    });
    $('#pwdtrade').bind('blur', function(){
        var pLen = $(this).val().length;
        var repLen = $('#repwdtrade').val().length;
        if(pLen < 6 || pLen > 20) {
            $('#pwdtrade_msg').html("×");
            $('#pwdtrade_msg').css('msg_error');
            return validateMsg('pwdtrade', '密码长度在6-20个字符之间', 0);
        }
        if($('#pwdtrade').val() == $('#pwd').val()){
            $('#pwdtrade_msg').html("×");
            $('#pwdtrade_msg').css('msg_error');
            return validateMsg('pwdtrade', '交易密码不能与登录密码一致哦', 0);
        }
        if(repLen>1){
            if($('#pwdtrade').val() != $('#repwdtrade').val()){
                $('#repwdtrade_msg').html("×");
                $('#repwdtrade_msg').css('msg_error');
                return validateMsg('repwdtrade', '再次输入的交易密码不一致', 0);
            }
        }
        $('#pwdtrade_msg').html("√");
        $('#pwdtrade_msg').css('msg_ok');
        return validateMsg('pwdtrade', '', valistep2.pwdtrade = 1);
    });
    $('#repwdtrade').bind('blur', function(){
        var pLen = $(this).val().length;
        if(pLen < 6 || pLen > 20){
            $('#repwdtrade_msg').html("×");
            $('#repwdtrade_msg').css('msg_error');
            return validateMsg('repwdtrade', '密码长度在6-20个字符之间', 0);
        }
        if($('#repwdtrade').val() != $('#pwdtrade').val()){
            $('#repwdtrade_msg').html("×");
            $('#repwdtrade_msg').css('msg_error');
            return validateMsg('repwdtrade', '密码不一致，请重新输入。', 0);
        }
        $('#repwdtrade_msg').html("√");
        $('#repwdtrade_msg').css('msg_ok');
        return validateMsg('repwdtrade', '', valistep2.repwdtrade = 1);
    });
    $("#tongyi").bind('click',function(){
        if($(this).val() == 1)
            $(this).val(0);
        else
            $(this).val(1);
        if($(this).val() == 0){
            return validateMsg('agreemsg', '需同意本网站服务条款方可进行下一步', vali.tongyi = 0);
        }else{
            return validateMsg('agreemsg', '', vali.tongyi = 1);
        }
    });

    function step1(){
        //检查第一步是否有问题
        for(var i in vali){
            if(!vali[i]) {
                event.preventDefault();
                return false;
            }
        }
        $('#step1').hide()
        $('#step2').show();
        $('#currentpwd').addClass('current');

    }
    function step2()
    {
        if(valistep2.pwdtrade==0 || valistep2.repwdtrade==0){
            return false;
        }else{
            return true;
        }

    }
</script>


<script>
    $("#ttttform").validate({
        submitHandler:function(form){
            ajax_submit_form(form)
            return false;
        },
        invalidHandler: function() {  //不通过回调
            return false;
        }
    });
</script>
       <!-- <div id="wei">Copyright 2016 ALLCOIN All Rights Reserved</div>
   </div> -->
</div>
<include file="App/Home/View/Public/footer.html"/>
</body>
</html>